package com.sjy.MyBlog.biz.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.sjy.MyBlog.bean.ArticleWithBLOBs;
import com.sjy.MyBlog.biz.ArticleBiz;
import com.sjy.MyBlog.dao.ArticleMapper;

@Service
public class ArticleBizImpl implements ArticleBiz{

	@Resource
	private ArticleMapper am;
	
	@Override
	public List<ArticleWithBLOBs> selectArticleByPage(int pageNum,int pageSize) {
		PageHelper.startPage(pageNum, pageSize);
		return am.selectByExampleWithBLOBs(null);
	}

	@Override
	public ArticleWithBLOBs selectArticleById(int id) {
		return am.selectByPrimaryKey(id);
	}

	
}
